﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using TianYu.Core.Common;

namespace TianYu.CMS.WebMvc.Areas.Admin.Controllers
{
    [Area("Admin")]
    public class VerifyImageController : Controller
    {
        public FileContentResult Index()
        { 
            var stream = Utils.CreateVerifyImage();

            HttpContext.Session.SetString("Captcha", stream.code);

            return File(stream.imageStream.ToArray(), "image/gif");

        }
    }
}